package entity

import (
	"time"
)

// MenuActionResource [...]
type MenuActionResource struct {
	ID        uint64    `gorm:"primaryKey;column:id" json:"-"`
	CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
	ActionID  uint64    `gorm:"column:action_id" json:"actionId"`
	Method    string    `gorm:"column:method" json:"method"` // http method
	Path      string    `gorm:"column:path" json:"path"`     // /开头 接口地址
}

// TableName get sql table name.获取数据库表名
func (m *MenuActionResource) TableName() string {
	return "menu_action_resource"
}

// MenuActionResourceColumns get sql column name.获取数据库列名
var MenuActionResourceColumns = struct {
	ID        string
	CreatedAt string
	UpdatedAt string
	ActionID  string
	Method    string
	Path      string
}{
	ID:        "id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
	ActionID:  "action_id",
	Method:    "method",
	Path:      "path",
}
